﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WebUtils.UrlShorteners
{
    public class rim : UrlShortener
    {
        private static rim instance = new rim();
        private rim() { }

        public static rim Instance { get { return instance; } }

        public override string Shorten(string pFullUrl)
        {
            return Utils.CallWeb(new HttpRequest()
            {
                Address = "http://r.im/api/index.cfm",
                GetParameters = new UnEncodedURLParameter[] 
                {
                    new UnEncodedURLParameter() { Key = "long_url", Value = pFullUrl }
                },
                Verb = WebMethodVerbEnum.GET
            }).Trim();
        }
    }
}
